package com.mcb.designmode;

public class Client {
    public static void main(String[]args){
        ConcreteSubject concreteSubject = new ConcreteSubject();

        ConcrereObserver c1 = new ConcrereObserver("用户1");
        ConcrereObserver c2 = new ConcrereObserver("用户2");
        ConcrereObserver c3 = new ConcrereObserver("用户3");
        //将观察者转载进被观察者队列
        concreteSubject.attach(c1);
        concreteSubject.attach(c2);
        concreteSubject.attach(c3);

        concreteSubject.notity("内容更新");
    }
}
